<?php
namespace app\admin\model;

use think\model;
class Goods extends Model{
    public static function getGoodList($where,$post){
        $list = Goods::alias('g')
            ->field('g.*,c.name cname')
            ->where($where)
            ->join('ecm_category c','g.cid=c.id')
            ->paginate([
                'list_rows'=>5,
                'query'=>$post
            ]);
        return $list;
    }
}